package page;

import java.util.List;

public class Pages {
    private List<String> common;
    private List<MenuLevel1> menus;

    public List<String> getCommon() {
        return common;
    }

    public void setCommon(List<String> common) {
        this.common = common;
    }

    public List<MenuLevel1> getMenus() {
        return menus;
    }

    public void setMenus(List<MenuLevel1> menus) {
        this.menus = menus;
    }

    public static abstract class Menu{
        //菜单id
        private String id;
        //菜单名称
        private String name;
        //当前菜单下通用服务
        private List<String> services;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<String> getServices() {
            return services;
        }

        public void setServices(List<String> services) {
            this.services = services;
        }

        @Override
        public String toString() {
            return "Menu{" +
                    "id='" + id + '\'' +
                    ", name='" + name + '\'' +
                    ", services=" + services +
                    '}';
        }
    }

    public static class MenuLevel1 extends Menu{
        private List<MenuLevel2> menus;

        public List<MenuLevel2> getMenus() {
            return menus;
        }

        public void setMenus(List<MenuLevel2> menus) {
            this.menus = menus;
        }
    }

    public static class MenuLevel2 extends Menu{
        //二级菜单页面url
        private String url;
        //支持的业务操作
        private List<Operation> operations;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public List<Operation> getOperations() {
            return operations;
        }

        public void setOperations(List<Operation> operations) {
            this.operations = operations;
        }
    }

    public static class Operation{
        //业务操作id
        private String id;
        //业务操作名
        private String name;
        //当前业务操作的服务链，针对复杂服务
        private List<String> requestChain;
        //当前业务操作的服务，针对简单服务
        private String service;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<String> getRequestChain() {
            return requestChain;
        }

        public void setRequestChain(List<String> requestChain) {
            this.requestChain = requestChain;
        }

        public String getService() {
            return service;
        }

        public void setService(String service) {
            this.service = service;
        }
    }
}
